#ifndef __OPENMV_H__
#define __OPENMV_H__
#include "bsp_usart.h"
// 带帧头帧尾的数据包

#define OPENMV_RECV_SIZE 9u 
#define OPENMV_SEND_SIZE 4u

#define OPENMV_FRAME_HEAD_1 0x2C
#define OPENMV_FRAME_HEAD_2 0x12


#pragma pack(1)
// 测试用
typedef enum
{
    OPENMV_NO_TARGET = 0,
    OPENMV_TARGET_CONVERGING = 1,
}Openmv_Target_State_e;
typedef enum
{
    OPENMV_OFF = 0,
    OPENMV_ON = 1,
}OPENMV_USE_STATE_e;

typedef struct 
{   

    uint8_t left_down_x;
    uint8_t left_down_y;
    uint8_t right_down_x;
    uint8_t right_down_y;
    uint8_t right_up_x;
    uint8_t right_up_y;
    uint8_t left_up_x;
    uint8_t left_up_y;
    
}Openmv_Recv_s;
typedef struct 
{
    OPENMV_USE_STATE_e openmv_use_state;


}Openmv_Send_s;
#pragma pack()

Openmv_Recv_s *OpenmvInit(UART_HandleTypeDef *_handle);

void OpenmvSend(Openmv_Send_s *send_data);

#endif // !